package com.jfs.observer.response.impl;

import com.jfs.enums.SipMethodEnum;
import com.jfs.observer.SIPProcessorObserver;
import com.jfs.observer.response.SIPResponseProcessor;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.sip.ResponseEvent;

/**
 * @Description bye响应处理器
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022/8/3
 */
@Component
@Slf4j
@AllArgsConstructor
public class SIPResponseByeProcessor implements SIPResponseProcessor, InitializingBean {
    private final SIPProcessorObserver sipProcessorObserver;
    @Override
    public void doProcess(ResponseEvent responseEvent) {
     //todo 暂不需要处理
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        sipProcessorObserver.addResponseProcess(SipMethodEnum.BYE, this);
    }
}
